package ms.unicorn.diagram.providers;

import java.util.LinkedList;
import java.util.List;

import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.operations.IUndoContext;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;

public class PasteTransactionalCommand extends AbstractTransactionalCommand {

	private EObject targetElement;
	private List elementsToPaste;
	private UnicornnEditorPasteCommand enclosingPasteCmd;
	private LinkedList elementsCreated;

	public PasteTransactionalCommand(TransactionalEditingDomain domain,
            List elemToPaste, EObject targetElement,
            UnicornnEditorPasteCommand pasteCmd) {
 
        super(domain, PasteTransactionalCommand.class.getName(),
        getWorkspaceFiles(elemToPaste));
        this.targetElement = targetElement;
        this.elementsToPaste = elemToPaste;
        this.targetElement = targetElement;
        this.enclosingPasteCmd = pasteCmd;
        this.elementsCreated = new LinkedList();
    }
	
	public void addContext(IUndoContext context) {
        super.addContext(context);
        this.enclosingPasteCmd.addContext(context);
    }
	
	@Override
	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
			IAdaptable info) throws ExecutionException {
		// TODO Auto-generated method stub
		return null;
	}

}
